<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/vue/2.6.14/vue.js" type="application/javascript"></script>
</head>
<body>
    <div id="app">
        <!-- <div @click="onclick">
            <el-button></el-button>
        </div> -->
        <!-- 简写👇 native是修饰符，一个语法糖 -->
        <!-- v-on作用于原生元素，是事件冒泡 -->
        <el-button type="" @click.native="onclick"></el-button>
    </div>
</body>
<script >
    Vue.component('el-button', {
        template: `<button>
            按钮
        </button>`
    })
    new Vue({
        el: '#app',
        data() {
            return {
                msg: 'hello vue'
            }
        },
        methods: {
            onClick(){
                console.log('点击了')
            }
        },
    })
</script>
</html>
